<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>模板管理</title>
	<meta name="decorator" content="default"/>
    <style>
        .tu-con{}
        .tu-con .tu-con-sou{float: left; background: #3bb3e0;position: relative;font-size: 25px;}
        .tu-con .tu-con-sou .tu-con-item{position: absolute;}
    </style>
</head>
<body>
	<ul class="nav nav-tabs">
		<li><a href="${ctx}/templet/eleTemplet/">模板列表</a></li>
		<li class="active"><a href="${ctx}/templet/eleTemplet/show?id=${eleTemplet.id}">模板<shiro:hasPermission name="templet:eleTemplet:edit">${not empty eleTemplet.id?'<spring:message code="common.modify"/>':'<spring:message code="common.add"/>'}</shiro:hasPermission><shiro:lacksPermission name="templet:eleTemplet:edit">查看</shiro:lacksPermission></a></li>
	</ul>
	<form:form id="inputForm" modelAttribute="eleTemplet" action="${ctx}/templet/eleTemplet/save" method="post" class="breadcrumb form-search">
		<form:hidden id="eleTempletId" path="id"/><form:hidden path="flag"/>
		<sys:message content="${message}"/>
        <ul class="ul-form">
            <li><label>模板名称：</label>
                <span>${eleTemplet.name}</span>
            </li>
            <li><label><spring:message code='common.resolution'/>：</label>
                <span>${eleTemplet.width} X ${eleTemplet.height}</span>
            </li>
            <li><label>屏幕方向：</label>
                <span>${fns:getDictLabel(eleTemplet.displaymode, 'displaymode', '')}
                </span>
            </li>
            <li><label><spring:message code='common.remarks'/>：</label>
                <span>${eleTemplet.remarks}</span>
            </li>
             <li><label>是否全屏：</label>
                <span>${fns:getDictLabel(eleTemplet.fullscreen, 'truefalse', '')}</span>
            </li>
        </ul>
        <div class="ul-form tu-con">
            <div class="tu-con-sou" style="width: ${eleTemplet.width}px;height: ${eleTemplet.height}px;">
                <c:forEach items="${eleTemplet.eleTempletSourceList}" var="source">
                    <c:if test="${source.sourceType != 'apk'}">
                        <div title="${source.sourceType}" class="tu-con-item" style="width: ${source.width}px;height: ${source.height}px;top:${source.yloc}px;left:${source.xloc}px;background: rgb(238, 238, 238);border: 1px dashed  rgb(171, 171, 171);">
                          
                                <img src="${ctxStatic}/images/source/${source.sourceType}.png" style="position: absolute;width: 50px;height: 50px;top: 50%;left: 50%;margin-left: -25px;margin-top: -25px;">
                           
                        </div>
                    </c:if>
                </c:forEach>
            </div>
        </div>
        <div style="float: left;margin-top: 10px;">
            <shiro:hasPermission name="templet:eleTemplet:edit">
                <a href="${ctx}/templet/eleTemplet/form?id=${eleTemplet.id}" style="margin-left: 30px;"><spring:message code="common.modify"/></a>
                <a href="${ctx}/templet/eleTemplet/complete?id=${eleTemplet.id}" class="btn btn-primary" style="margin-left: 30px;">完成</a>
            </shiro:hasPermission>
        </div>
	</form:form>
</body>
</html>